package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.THouseAssetsAttachMapper;
import com.ruoyi.system.domain.THouseAssetsAttach;
import com.ruoyi.system.service.ITHouseAssetsAttachService;
import com.ruoyi.common.core.text.Convert;

/**
 * 房产资产附件信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-22
 */
@Service
public class THouseAssetsAttachServiceImpl implements ITHouseAssetsAttachService 
{
    @Autowired
    private THouseAssetsAttachMapper tHouseAssetsAttachMapper;

    /**
     * 查询房产资产附件信息
     * 
     * @param id 房产资产附件信息主键
     * @return 房产资产附件信息
     */
    @Override
    public THouseAssetsAttach selectTHouseAssetsAttachById(Long id)
    {
        return tHouseAssetsAttachMapper.selectTHouseAssetsAttachById(id);
    }

    /**
     * 查询房产资产附件信息列表
     * 
     * @param tHouseAssetsAttach 房产资产附件信息
     * @return 房产资产附件信息
     */
    @Override
    public List<THouseAssetsAttach> selectTHouseAssetsAttachList(THouseAssetsAttach tHouseAssetsAttach)
    {
        return tHouseAssetsAttachMapper.selectTHouseAssetsAttachList(tHouseAssetsAttach);
    }

    /**
     * 新增房产资产附件信息
     * 
     * @param tHouseAssetsAttach 房产资产附件信息
     * @return 结果
     */
    @Override
    public int insertTHouseAssetsAttach(THouseAssetsAttach tHouseAssetsAttach)
    {
        tHouseAssetsAttach.setCreateTime(DateUtils.getNowDate());
        return tHouseAssetsAttachMapper.insertTHouseAssetsAttach(tHouseAssetsAttach);
    }

    /**
     * 修改房产资产附件信息
     * 
     * @param tHouseAssetsAttach 房产资产附件信息
     * @return 结果
     */
    @Override
    public int updateTHouseAssetsAttach(THouseAssetsAttach tHouseAssetsAttach)
    {
        tHouseAssetsAttach.setUpdateTime(DateUtils.getNowDate());
        return tHouseAssetsAttachMapper.updateTHouseAssetsAttach(tHouseAssetsAttach);
    }

    /**
     * 批量删除房产资产附件信息
     * 
     * @param ids 需要删除的房产资产附件信息主键
     * @return 结果
     */
    @Override
    public int deleteTHouseAssetsAttachByIds(String ids)
    {
        return tHouseAssetsAttachMapper.deleteTHouseAssetsAttachByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除房产资产附件信息信息
     * 
     * @param id 房产资产附件信息主键
     * @return 结果
     */
    @Override
    public int deleteTHouseAssetsAttachById(Long id)
    {
        return tHouseAssetsAttachMapper.deleteTHouseAssetsAttachById(id);
    }
}
